<template>
	<view>
		<text class="iconfont icon-done"></text>
		<text class="uniui-icon-symbol-tool-03"></text>
		<button type="primary" @tap="login">这是一个神奇的按钮</button>
		<button type="warn" @tap="Warnlogin">千万别点啊</button>
		<button @tap="TestLogin">测试验证码接口</button>
	</view>
</template>

<script setup>
	import { getCodeApi } from '../../apis/user'
	import { request } from '@/utils/request.ts'

	const login = async () => {
		const res = await request.post('/login/password', {
			mobile: '13230000069',
			password: 'abc12345',
		})

		console.log(res)
	}

	const Warnlogin = async () => {
		const res = await request.post(
			'/login/password',
			{
				mobile: '13230000069',
				password: 'abc12345',
			},
			{ custom: { loading: false } }
		)

		console.log(res)
	}

	const TestLogin = async () => {
		const res = await getCodeApi({
			mobile: '13230000070',
			type: 'login',
		})
		console.log(res.code)
	}
</script>

<style></style>
